Formatting TAG IN HTML

HTML formatting tags are essential for styling and organizing content on webpages. Tags like <b> for bold, <i> for italic, and <u> for underline allow for text emphasis. Meanwhile, <strong> and <em> offer stronger emphasis options. Subscript and superscript features are facilitated by <sub> and <sup> respectively. These tags, when combined with other HTML elements and CSS, play a crucial role in enhancing readability and aesthetics, ensuring a visually appealing and well-structured presentation of information on the web.

  • Example of Formatting Tag :
  • Example-1


    <!DOCTYPE html> <html> <head> <title></title> </head> <body> <p><b>This text is bold</b></p> <p><i>This text is italic</i></p> <p><strong>This text is strong.</strong></p> <p><u>This text is underlined</u></p> </body> </html>

    Output :

    This text is bold

    This text is italic

    This text is strong.

    This text is underlined

    Example-2

    <!DOCTYPE html> <html> <head> <title></title> </head> <body> <p>This is<sub> subscript</sub> and <sup>superscript</sup></p> <p><em>This text is emphasized.</em></p> <h2>HTML <small>Small</small> Formatting</h2> <h2>HTML <mark>Marked</mark> Formatting</h2> </body> </html>

    Output :

    This is subscript and superscript

    This text is emphasized.

    HTML Small Formatting

    HTML Marked Formatting

    Example-3

    <!DOCTYPE html> <html> <body> <p>My favorite color is <del>blue</del> red.</p> <p>My favorite <ins>color</ins> is red.</p> <tt>Paragraph in monospaced font.</tt> </body> </html>

    Output :

    My favorite color is blue red.

    My favorite color is red.

    Paragraph in monospaced font.

  • Conclusion :
  • In conclusion, HTML formatting tags play a crucial role in structuring and styling web content. From emphasizing text with <strong> and <em> to organizing data with <ul> and <ol>, these tags provide versatility and clarity to web design. With the right implementation, they enhance user experience, accessibility, and readability. Understanding and utilizing formatting tags effectively can greatly improve the presentation and functionality of web pages, contributing to a more engaging online experience.